﻿namespace SS.Common.Collection
{
    using System.Collections.Generic;

    #region Using namespaces

    

    #endregion

    /// <summary>
    /// Represent a thread safe list
    /// </summary>
    /// <typeparam name="T">
    /// The type of elements in the list
    /// </typeparam>
    public interface ISyncList<T> : IList<T>
    {
        /// <summary>
        /// Synchronize object
        /// </summary>
        object SyncObj { get; }

        /// <summary>
        /// Sort all elements in the list
        /// </summary>
        /// <param name="comparer">The comparer</param>
        /// <returns>
        /// True if succeeds, No Exception here
        /// </returns>
        bool TrySort(IComparer<T> comparer);
    }
}


